#!/usr/bin/env python
'''
The sum of the squares of the first ten natural numbers is,

'''
sum_of_squares = 0
square_of_sum = 0
itr = iter(xrange(1,101))
number = itr.next()
while True:
	sum_of_squares += (number ** 2)
	square_of_sum += number
	if(number == 100):
		break
	number = itr.next()
	

square_of_sum = square_of_sum ** 2
if sum_of_squares <= square_of_sum:
	result = square_of_sum - sum_of_squares
else:
	result = sum_of_squares - square_of_sum
print result


